<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //3.删除元素,删除的当前链接的li 它的父亲
        var as=document.querySelectorAll('a');
        for(var i=0;i<as.length;i++){
            as[i].onclick=function(){
                //node.remoxechild(child);删除的是li当前a所在的li this.parentNode
                ul.remoceChild(this.parentNode);
            }
        }
    </script>
</body>
</html>